import Vue from 'vue';
import Vonic from 'vonic';
import VueStomp from "vue-stomp";
import barrage from "vue2-barrage"
import VueVideoPlayer from 'vue-video-player'
import {
  END_POINT
} from 'tools/config';
import $ajax from 'tools/axios'
import {
  routes,
  beforeEach
} from 'src/router/routes'

import store from 'src/store/index'

// 引入rem布局方案
import 'tools/rem.js'

Vue.prototype.$ajax = $ajax;

//websocket
Vue.use(VueStomp, END_POINT);
Vue.use(barrage)
Vue.use(VueVideoPlayer)

Vonic.app.setConfig(
  'beforeEach', beforeEach
)

Vonic.app.setConfig('pushMethod', 'replace')
Vue.use(Vonic.app, {
  routes,
  store
})
